.class public Lcom/adview/adapters/IzpAdapter;
.super Lcom/adview/adapters/AdViewAdapter;
.source "IzpAdapter.java"

# interfaces
.implements Lcom/izp/views/IZPDelegate;


# direct methods
.method public constructor <init>(Lcom/adview/AdViewLayout;Lcom/adview/obj/Ration;)V
    .locals 0
    .parameter "adViewLayout"
    .parameter "ration"

    .prologue
    .line 20
    invoke-direct {p0, p1, p2}, Lcom/adview/adapters/AdViewAdapter;-><init>(Lcom/adview/AdViewLayout;Lcom/adview/obj/Ration;)V

    .line 21
    return-void
.end method


# virtual methods
.method public didReceiveFreshAd(Lcom/izp/views/IZPView;I)V
    .locals 3
    .parameter "view"
    .parameter "adCount"

    .prologue
    .line 66
    invoke-static {}, Lcom/adview/AdViewTargeting;->getRunMode()Lcom/adview/AdViewTargeting$RunMode;

    move-result-object v0

    sget-object v1, Lcom/adview/AdViewTargeting$RunMode;->TEST:Lcom/adview/AdViewTargeting$RunMode;

    if-ne v0, v1, :cond_0

    .line 67
    const-string v0, "AdView SDK v1.7.0"

    new-instance v1, Ljava/lang/StringBuilder;

    const-string v2, "didReceiveFreshAd, adCount="

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 69
    :cond_0
    return-void
.end method

.method public didShowFreshAd(Lcom/izp/views/IZPView;)V
    .locals 3
    .parameter "view"

    .prologue
    .line 83
    invoke-static {}, Lcom/adview/AdViewTargeting;->getRunMode()Lcom/adview/AdViewTargeting$RunMode;

    move-result-object v1

    sget-object v2, Lcom/adview/AdViewTargeting$RunMode;->TEST:Lcom/adview/AdViewTargeting$RunMode;

    if-ne v1, v2, :cond_0

    .line 84
    const-string v1, "AdView SDK v1.7.0"

    const-string v2, "didShowFreshAd"

    invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 86
    :cond_0
    invoke-virtual {p1}, Lcom/izp/views/IZPView;->stopAdExchange()V

    .line 87
    const/4 v1, 0x0

    iput-object v1, p1, Lcom/izp/views/IZPView;->delegate:Lcom/izp/views/IZPDelegate;

    .line 89
    iget-object v1, p0, Lcom/adview/adapters/IzpAdapter;->adViewLayoutReference:Ljava/lang/ref/WeakReference;

    invoke-virtual {v1}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/adview/AdViewLayout;

    .line 90
    .local v0, adViewLayout:Lcom/adview/AdViewLayout;
    if-nez v0, :cond_1

    .line 95
    :goto_0
    return-void

    .line 93
    :cond_1
    iget-object v1, v0, Lcom/adview/AdViewLayout;->adViewManager:Lcom/adview/AdViewManager;

    invoke-virtual {v1}, Lcom/adview/AdViewManager;->resetRollover()V

    .line 94
    invoke-virtual {v0}, Lcom/adview/AdViewLayout;->rotateThreadedDelayed()V

    goto :goto_0
.end method

.method public didStopFullScreenAd(Lcom/izp/views/IZPView;)V
    .locals 2
    .parameter "view"

    .prologue
    .line 124
    invoke-static {}, Lcom/adview/AdViewTargeting;->getRunMode()Lcom/adview/AdViewTargeting$RunMode;

    move-result-object v0

    sget-object v1, Lcom/adview/AdViewTargeting$RunMode;->TEST:Lcom/adview/AdViewTargeting$RunMode;

    if-ne v0, v1, :cond_0

    .line 125
    const-string v0, "AdView SDK v1.7.0"

    const-string v1, "didStopFullScreenAd"

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 126
    :cond_0
    return-void
.end method

.method public errorReport(Lcom/izp/views/IZPView;ILjava/lang/String;)V
    .locals 3
    .parameter "view"
    .parameter "errorCode"
    .parameter "errorInfo"

    .prologue
    .line 107
    invoke-static {}, Lcom/adview/AdViewTargeting;->getRunMode()Lcom/adview/AdViewTargeting$RunMode;

    move-result-object v1

    sget-object v2, Lcom/adview/AdViewTargeting$RunMode;->TEST:Lcom/adview/AdViewTargeting$RunMode;

    if-ne v1, v2, :cond_0

    .line 108
    const-string v1, "AdView SDK v1.7.0"

    const-string v2, "errorReport"

    invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 110
    :cond_0
    invoke-virtual {p1}, Lcom/izp/views/IZPView;->stopAdExchange()V

    .line 111
    const/4 v1, 0x0

    iput-object v1, p1, Lcom/izp/views/IZPView;->delegate:Lcom/izp/views/IZPDelegate;

    .line 113
    iget-object v1, p0, Lcom/adview/adapters/IzpAdapter;->adViewLayoutReference:Ljava/lang/ref/WeakReference;

    invoke-virtual {v1}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/adview/AdViewLayout;

    .line 114
    .local v0, adViewLayout:Lcom/adview/AdViewLayout;
    if-nez v0, :cond_1

    .line 119
    :goto_0
    return-void

    .line 117
    :cond_1
    iget-object v1, v0, Lcom/adview/AdViewLayout;->adViewManager:Lcom/adview/AdViewManager;

    invoke-virtual {v1}, Lcom/adview/AdViewManager;->resetRollover_pri()V

    .line 118
    invoke-virtual {v0}, Lcom/adview/AdViewLayout;->rotateThreadedPri()V

    goto :goto_0
.end method

.method public handle()V
    .locals 5

    .prologue
    .line 27
    invoke-static {}, Lcom/adview/AdViewTargeting;->getRunMode()Lcom/adview/AdViewTargeting$RunMode;

    move-result-object v3

    sget-object v4, Lcom/adview/AdViewTargeting$RunMode;->TEST:Lcom/adview/AdViewTargeting$RunMode;

    if-ne v3, v4, :cond_0

    .line 28
    const-string v3, "AdView SDK v1.7.0"

    const-string v4, "Into Izp"

    invoke-static {v3, v4}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 29
    :cond_0
    iget-object v3, p0, Lcom/adview/adapters/IzpAdapter;->adViewLayoutReference:Ljava/lang/ref/WeakReference;

    invoke-virtual {v3}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/adview/AdViewLayout;

    .line 30
    .local v2, adViewLayout:Lcom/adview/AdViewLayout;
    if-nez v2, :cond_2

    .line 53
    :cond_1
    :goto_0
    return-void

    .line 34
    :cond_2
    iget-object v3, v2, Lcom/adview/AdViewLayout;->activityReference:Ljava/lang/ref/WeakReference;

    invoke-virtual {v3}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/app/Activity;

    .line 35
    .local v0, activity:Landroid/app/Activity;
    if-eqz v0, :cond_1

    .line 39
    new-instance v1, Lcom/izp/views/IZPView;

    invoke-direct {v1, v0}, Lcom/izp/views/IZPView;-><init>(Landroid/content/Context;)V

    .line 40
    .local v1, adView:Lcom/izp/views/IZPView;
    iget-object v3, p0, Lcom/adview/adapters/IzpAdapter;->ration:Lcom/adview/obj/Ration;

    iget-object v3, v3, Lcom/adview/obj/Ration;->key:Ljava/lang/String;

    iput-object v3, v1, Lcom/izp/views/IZPView;->productID:Ljava/lang/String;

    .line 41
    const-string v3, "1"

    iput-object v3, v1, Lcom/izp/views/IZPView;->adType:Ljava/lang/String;

    .line 42
    invoke-static {}, Lcom/adview/AdViewTargeting;->getRunMode()Lcom/adview/AdViewTargeting$RunMode;

    move-result-object v3

    sget-object v4, Lcom/adview/AdViewTargeting$RunMode;->TEST:Lcom/adview/AdViewTargeting$RunMode;

    if-ne v3, v4, :cond_3

    .line 43
    const/4 v3, 0x1

    iput-boolean v3, v1, Lcom/izp/views/IZPView;->isDev:Z

    .line 46
    :goto_1
    iput-object p0, v1, Lcom/izp/views/IZPView;->delegate:Lcom/izp/views/IZPDelegate;

    .line 47
    invoke-virtual {v1}, Lcom/izp/views/IZPView;->startAdExchange()V

    .line 49
    iget-object v3, v2, Lcom/adview/AdViewLayout;->adViewManager:Lcom/adview/AdViewManager;

    invoke-virtual {v3}, Lcom/adview/AdViewManager;->resetRollover()V

    .line 50
    invoke-virtual {v2, v1}, Lcom/adview/AdViewLayout;->pushSubViewForIzp(Landroid/view/ViewGroup;)V

    goto :goto_0

    .line 45
    :cond_3
    const/4 v3, 0x0

    iput-boolean v3, v1, Lcom/izp/views/IZPView;->isDev:Z

    goto :goto_1
.end method

.method public shouldRequestFreshAd(Lcom/izp/views/IZPView;)Z
    .locals 2
    .parameter "view"

    .prologue
    .line 57
    invoke-static {}, Lcom/adview/AdViewTargeting;->getRunMode()Lcom/adview/AdViewTargeting$RunMode;

    move-result-object v0

    sget-object v1, Lcom/adview/AdViewTargeting$RunMode;->TEST:Lcom/adview/AdViewTargeting$RunMode;

    if-ne v0, v1, :cond_0

    .line 58
    const-string v0, "AdView SDK v1.7.0"

    const-string v1, "shouldRequestFreshAd"

    invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 60
    :cond_0
    const/4 v0, 0x1

    return v0
.end method

.method public shouldShowFreshAd(Lcom/izp/views/IZPView;)Z
    .locals 2
    .parameter "view"

    .prologue
    .line 74
    invoke-static {}, Lcom/adview/AdViewTargeting;->getRunMode()Lcom/adview/AdViewTargeting$RunMode;

    move-result-object v0

    sget-object v1, Lcom/adview/AdViewTargeting$RunMode;->TEST:Lcom/adview/AdViewTargeting$RunMode;

    if-ne v0, v1, :cond_0

    .line 75
    const-string v0, "AdView SDK v1.7.0"

    const-string v1, "shouldShowFreshAd"

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 77
    :cond_0
    const/4 v0, 0x1

    return v0
.end method

.method public willLeaveApplication(Lcom/izp/views/IZPView;)V
    .locals 2
    .parameter "view"

    .prologue
    .line 100
    invoke-static {}, Lcom/adview/AdViewTargeting;->getRunMode()Lcom/adview/AdViewTargeting$RunMode;

    move-result-object v0

    sget-object v1, Lcom/adview/AdViewTargeting$RunMode;->TEST:Lcom/adview/AdViewTargeting$RunMode;

    if-ne v0, v1, :cond_0

    .line 101
    const-string v0, "AdView SDK v1.7.0"

    const-string v1, "willLeaveApplication"

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 102
    :cond_0
    return-void
.end method
